// components/ChatSidebar/index.tsx
import {useState} from "react"
import ChatHeader from "./ChatHeader"
import ChatMessages from "./ChatMessages"
import ChatInput from "./ChatInput"

const ChatSidebar = () => {
    const [messages, setMessages] = useState<string[]>([])

    const handleSend = (msg: string) => {
        setMessages((prev) => [...prev, msg])
    }

    return (
        <div className="flex flex-col h-full w-full bg-white border-r shadow-sm">
            <ChatHeader/>
            <ChatMessages messages={messages}/>
            <ChatInput onSend={handleSend}/>
        </div>
    )
}

export default ChatSidebar